#[derive(Debug)]
enum AEnum {
    Foo,
    Bar,
}
pub fn fn_matches_marco() {
    let v = vec![AEnum::Foo, AEnum::Bar];
    let result = v.iter().filter(|x| matches!(x, AEnum::Foo));
    println!("here is me Filtering {:?}", result);

    let foo = 'f';
    assert!(matches!(foo, 'A'..='Z' | 'a'..='z'));

    let bar = Some(1);
    // assert!(matches!(bar, Some(x) if x > 2)); // 注释去掉这里会中断后面程序的运行
}
